﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Respawn : MonoBehaviour
{
    public float thresh;

    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if (transform.position.y <= thresh)
        {
            float scale = transform.localScale.y;
            transform.position = new Vector3(Random.Range(-100, 100), scale / 2, Random.Range(-100, 100));
        }
    }
}
